package com.mk.es.service.transport.entity;

import java.io.Serializable;
import java.util.List;

/**
 * ES查询返回结果
 */
public class EsQueryResult<T> implements Serializable {
    private static final long serialVersionUID = -7047037081506758434L;

    private List<EsItem<T>> items;
    private long totalRecord;//总记录数

    public EsQueryResult() {
    }

    public List<EsItem<T>> getItems() {
        return items;
    }

    public void setItems(List<EsItem<T>> items) {
        this.items = items;
    }

    public long getTotalRecord() {
        return totalRecord;
    }

    public void setTotalRecord(long totalRecord) {
        this.totalRecord = totalRecord;
    }

    @Override
    public String toString() {
        return "EsQueryResult{\n items=" + items + ",\n totalRecord=" + totalRecord + "\n}";
    }
}
